class Cat:
    """一次模拟小狗的简单尝试"""

    def __init__(self, name, age):
        """初始化属性name和age。"""
        self.name = name
        self.age = age
        print("_init__(self, 形参, 形参，...)类里面的固定方法")

    def sit(self):
        """模拟小狗收到命令时蹲下"""
        print(f"{self.name} is now sitting.")

    def roll_over(self):
        """模拟小狗收到命令时打滚。"""
        print(f"{self.name} rolled over!")

    def run(self):
        """模拟小狗收到命令时跑"""
        return f"{self.name} is running"


if __name__ == '__main__':
    print(__name__ == '__main__')
    my_dog = Cat("小黄", 4)
    my_dog.sit()
    my_dog.roll_over()
    my_dog.run()


